package com.yesjpt.domain;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class MailAuthenticator extends Authenticator {
	//private String username = ResourceBundle.getBundle("config").getString("mail.username");
	//private String password = ResourceBundle.getBundle("config").getString("mail.password");
	private String username;
	private String password;
    //private  String username="jbchen@home.swjtu.edu.cn";   
    //private  String password="friday99";   
    
    public MailAuthenticator() {
        super();
    }
    
    public MailAuthenticator(String userName , String password) {
        super();
        this.username = userName;
        this.password = password;
    }
    protected PasswordAuthentication getPasswordAuthentication(){   
        return new PasswordAuthentication(this.username, this.password);   
    } 
}
